package com.falcon.generator.vben.mapping;

import java.util.HashMap;
import java.util.Map;

/**
 * @author zongf
 * @date 2024-02-18
 **/
public class TsTypeMapping {


    public static Map<String, String> javaMapTs = new HashMap<>();

    static {
        javaMapTs.put("int", "number");
        javaMapTs.put("Integer", "number");
        javaMapTs.put("long", "number");
        javaMapTs.put("Long", "number");
        javaMapTs.put("String", "string");
        javaMapTs.put("Date", "Date");
        javaMapTs.put("Boolean", "boolean");
        javaMapTs.put("boolean", "boolean");
    }

    public static String getTsType(String javaType) {
        return javaMapTs.get(javaType);
    }

    public static boolean isBasicType(String javaType) {
        return javaMapTs.containsKey(javaType);
    }

}
